/*
 * AppEventListener.cpp
 *
 *  Created on: Feb 14, 2012
 *      Author: hzheng
 */

#include "AppEventListener.h"
#include "errorcode.h"
#include "AppEvent.h"

namespace NS_LCD_AFW
{

CAppEventListener::CAppEventListener()
{
}

CAppEventListener::CAppEventListener(CEventHandler *pEventHandler,
		bool bAutoRelease)
:IEventListener(pEventHandler,bAutoRelease)
{
}

CAppEventListener::CAppEventListener(CEventHandler *pEventHandler, int interestEventId,
		AFW_EventCallBack callBack ,int param,bool bAutoRelease)
:IEventListener(pEventHandler,interestEventId,callBack,param,bAutoRelease)
{
}

int CAppEventListener::actionPerformed(IEvent *pEvent)
{
	if (NULL == pEvent)
	{
		return ERR_INVALID_EVENT;
	}

	CAppEvent *pAppEvent = dynamic_cast<CAppEvent *>(pEvent);
	if (NULL == pAppEvent)
	{
		return ERR_NOT_APP_EVENT;
	}

	return IEventListener::actionPerformed(pEvent);
}

CAppEventListener::~CAppEventListener()
{
}

} /* namespace NS_LCD_AFW */
